//////////////////////////////////////////////////////////////////////////
#pragma warning(disable:4786) // long identifier names warning, STL

//////////////////////////////////////////////////////////////////////////
#include "object/NO_CModule.h"
#include "archive/NO_CModule.h"
#include "type/NO_CModule.h"
#include "event/NO_CModule.h"
#include "type/NO_Test.h"
#include <crtdbg.h>
#include <algorithm>
#include <locale>
#include <functional>

//////////////////////////////////////////////////////////////////////////
void main(int argc, char *argv[]) 
{ 
	std::cout<<str.c_str()<<std::endl;
	std::locale l;
	std::tolower(1,l);

//	std::transform(str.begin(),str.end(),str.begin(),std::tolower);

	std::cout<<str.c_str()<<std::endl;

	_CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE );
	_CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDOUT );
	_CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE );
	_CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDOUT );
	_CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE );
	_CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDOUT );
	
	_CrtMemState s1, s2, s3;
	_CrtMemCheckpoint( &s1 );

	try
	{
		NO_Library lib1("NO_Plugin");
		lib1.test();
		
		//NO_Library lib2("NO_Editor");
		//lib2.test();
	}
	catch (std::bad_cast& e)	{std::cout<<e.what()<<std::endl;}
	catch (std::bad_typeid& e)	{std::cout<<e.what()<<std::endl;}
	catch (std::exception& e)	{std::cout<<e.what()<<std::endl;}
	catch (...)	{std::cout<<"Main failed"<<std::endl;}
	
	_CrtMemCheckpoint( &s2 );
	
	if(_CrtMemDifference(&s3,&s2,&s1))
	{_CrtMemDumpStatistics(&s3);}
	
	return;
}

